import json
def my_name():
    names = 'names.json'
    try:
        with open(names) as work_a:
            name_wel = json.load(work_a)
    except FileNotFoundError:
        return None
    else:
        return name_wel

def get_new_username():
    name_wel = input("what is you name?")
    names = 'names.json'
    with open(names,'w') as name_list:
        json.dump(name_wel,name_list)
    return name_wel

def name_return():
    name_wel = my_name()
    if name_wel:
        print("Welcome back, " + name_wel + "!")
    else:
        name_wel = my_name()
        print("welcome! " + name_wel + '!')
name_return()